    //
//  FullImageView.m
//  iFlower
//
//  Created by HoangThuc on 11/24/10.
//  Copyright 2010 iNIL.me. All rights reserved.
//

#import "FullImageView.h"
#import "iFlowerAppDelegate.h"
#import "MyAccountView.h"
#import "LoginView.h"
#import "RegisterView.h"


@implementation FullImageView
@synthesize imageView,image;
-(IBAction) buttonMenu
{
	[self.navigationController popViewControllerAnimated:YES];
}
-(IBAction) buttonMyAccount
{
	if ([[iFlowerAppDelegate shareDelegate] logined]) {
		MyAccountView * account = [[MyAccountView alloc] initWithNibName:@"MyAccountView" bundle:nil];
		[self.navigationController pushViewController:account animated:YES];
		[account release];
	}
	else {
		LoginView * login = [[LoginView alloc] initWithNibName:@"LoginView" bundle:nil];
		[self.navigationController pushViewController:login animated:YES];
		[login release];		
	}
}
-(IBAction) buttonRegister
{
	RegisterView * registerV = [[RegisterView alloc] initWithNibName:@"RegisterView" bundle:nil];
	[self.navigationController pushViewController:registerV animated:YES];
	[registerV release];
}
-(IBAction)backButton
{
	[self.navigationController popViewControllerAnimated:YES];
}
/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
	imageView.image = image;
}


/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
	[image release];
	[imageView release];
    [super dealloc];
}


@end
